﻿// Decompiled with JetBrains decompiler
// Type: TaleWorlds.CampaignSystem.MapEvents.MapEventComponent
// Assembly: TaleWorlds.CampaignSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E85F8C15-4DF6-4E9C-A58A-29177E40D07A
// Assembly location: D:\steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client\TaleWorlds.CampaignSystem.dll

using System.Collections.Generic;

#nullable disable
namespace TaleWorlds.CampaignSystem.MapEvents
{
  public abstract class MapEventComponent
  {
    protected virtual void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
    {
    }

    public MapEvent MapEvent { get; private set; }

    protected MapEventComponent(MapEvent mapEvent) => this.MapEvent = mapEvent;

    internal void AfterLoad(MapEvent mapEvent)
    {
      this.MapEvent = mapEvent;
      this.OnAfterLoad();
    }

    internal void InitializeComponent() => this.OnInitialize();

    internal void FinalizeComponent() => this.OnFinalize();

    protected virtual void OnInitialize()
    {
    }

    protected virtual void OnFinalize()
    {
    }

    internal virtual void Update(ref bool finish)
    {
    }

    internal virtual void Finish()
    {
    }

    internal virtual void OnAfterLoad()
    {
    }
  }
}
